package com.youku.collector;

import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

public class ProducerController {

	private Producer producer;

	private Executor executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2);

	public ProducerController(Producer producer) {
		this.producer = producer;
	}

	public void start() {
		executor.execute(producer);
	}
}
